<%--
  Created by IntelliJ IDEA.
  User: YYY-Work
  Date: 2017/4/26
  Time: 14:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path;
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>AdminLTE | Data Tables</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>


    <!-- start分页需要使用以下三个js -->
    <script type="text/javascript" src="<%=basePath%>/js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/admin/utils.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/base/listtable.js"></script>
    <!-- end分页需要使用以上三个js -->

</head>
<body class="skin-blue">

<!-- getHeader -->
<s:action name="getHeader" namespace="/privilege" executeResult="true"/>

<div class="wrapper row-offcanvas row-offcanvas-left">

    <!-- Left side column. contains the logo and sidebar -->

    <!-- getMenus -->
    <s:action name="getMenus" namespace="/privilege" executeResult="true"/>

    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">

        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                <small>就诊人管理</small>
            </h1>
            <ol class="breadcrumb" style="display: none">
                <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                <li><a href="#">Tables</a></li>
                <li class="active">Data tables</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">

                        <div class="box box-danger">

                            <div class="box-body">

                                <form action="javascript:searchPatient();" class="form" name="searchForm">
                                    <lable>用户ID</lable>
                                    <input type="text" id="userID" class="input-small">
                                    <lable>就诊人ID</lable>
                                    <input type="text" id="patientID" class="input-small">
                                    <lable>就诊人姓名</lable>
                                    <input type="text" id="patientName" class="input-small">
                                    <button type="submit" class="btn btn-info">查询</button>
                                </form>
                            </div><!-- /.box-body -->
                        </div><!-- /.box -->

                        <!--患者列表-->
                        <form method="post" target="_self" action="" name="listForm">
                            <div class="box-body table-responsive" id="listDiv">

                                <s:property value="res" escape="false"/>
                            </div><!-- /.box-body -->
                        </form>


                    </div>
                </div>
            </div>
        </section>
    </aside>
</div>


</body>

<script type="text/javascript">

    //查询文章
    function searchPatient() {

        listTable.filter['userid'] = Utils.trim(document.forms['searchForm'].elements['userID'].value);
        listTable.filter['patientid'] = Utils.trim(document.forms['searchForm'].elements['patientID'].value);
        listTable.filter['patientName'] = Utils.trim(document.forms['searchForm'].elements['patientName'].value);
        listTable.filter['currentPage'] = 1;
        listTable.action = "<%=basePath%>/patient/ajaxQueryPatient.action";
        listTable.loadList();
    }

    $(document).ready(new function () {
            searchPatient()
    })
</script>

</html>
